<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title></title>
    <#include "/jeecms_sys/head.html"/>
    <script type="text/javascript">

        function getTableForm() {
            return document.getElementById('tableForm');
        }
        function optDelete() {
            if(Pn.checkedCount('ids')<=0) {
                alert("<@s.m 'error.checkRecord'/>");
                return;
            }
            if(!confirm("<@s.m 'global.confirm.delete'/>")) {
                return;
            }
            var f = getTableForm();
            f.action="o_delete.do";
            f.submit();
        }
    </script>
</head>
<body>
<div class="box-positon">
    <div class="clear"></div>
</div>
<div class="body-box">
    <form action="v_list.do" method="post" style="padding-top:5px;">
        <div>
            标题: <input type="text"  name="title" />
            内容: <input type="text"  name="content" />
            <input class="query" type="submit" value="<@s.m "global.query"/>"/>
        </div>
    </form>
    <form id="tableForm" method="post">
        <input type="hidden" name="pageNo" value="${pagination.pageNo!}"/>
        <@p.table value=shares;share,i,has_next><#rt/>
            <@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
                 <input type='checkbox' name='ids' value='${share.id}'/><#t/>
            </@p.column><#t/>
            <@p.column code="标题">${share.title!}</@p.column><#t/>
            <@p.column code="副标题">${share.subTitle!}</@p.column><#t/>
            <@p.column code="内容">
                    <#if share.content?length gt 10>
                        ${share.content?substring(0,10)}...
                    <#else>
                        ${share.content}
                    </#if>

            </@p.column><#t/>
            <@p.column code="创建时间">${share.createTime!}</@p.column><#t/>
            <@p.column code="点赞数">${share.praise.count!}</@p.column><#t/>
            <@p.column code="审核状态">
                <#if share.status ==1>
                    <font color="green">通过</font>
                <#else>
                    <font color="red">未通过</font>
                </#if>
            </@p.column><#t/>
            <@p.column code="global.operate" align="center">
            <a href="v_edit.do?id=${share.id}" class="pn-opt">编辑</a> | <#rt/>
            <#if share.status ==1>
                <a href="o_changeStatus.do?id=${share.id}&status=-1" class="pn-opt">审核失败</a><#rt/>
            <#else>
                <a href="o_changeStatus.do?id=${share.id}&status=1" class="pn-opt">审核通过</a><#rt/>
            </#if>
            </@p.column><#t/>
        </@p.table>
<div><input class="del-button" type="button" value="<@s.m "global.delete"/>" onclick="optDelete();"/></div>
    </form>
</div>
<#include "/common/alert_message.html"/>
</body>
</html>